<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<div class="show-info"  style="width: 500px">
	<!-- t改为shieldTarget，且为jQuery选择器形式 -->
    <form action="${ctxPathA}/oa/work/userRelation/supervisor_search" method="post" shieldTarget="#searchResult" class="searchForm autoSubmitForm_plugin"   successDo="shieldDonothing" >
	   	<input type="hidden" name="id" value="${id}" />
	   	<input type="hidden" name="type" value="${type}" />
	    <div class="search-box">
			<span class="search-i"><b>用户姓名：</b><input type="text" name="<shield:encrypt value="like_userName"/>" /></span>
		    <span class="search-i"><b>手机号：</b><input type="text" name="<shield:encrypt value="equal_mobile"/>" /></span>
		    <span class="search-i"><input class="submit" type="submit" name="doSearch" value="查询"></span>
	    </div>
	    <div id="searchResult">
	    
	    </div>
    </form>
</div>
<div class="show-info" style="width: 200px;position: absolute;top:-4px;left: 530px">
<table class="tab-list shield-table-odd" >
<caption>
<c:choose>
<c:when test="${type eq 0 }">
   ${model.userName}的上级用户
</c:when>
<c:when test="${type eq 1}">
    ${model.userName}的下级用户
</c:when>
</c:choose>

 </caption>
    <tr>
	    <th>用户姓名</th>
	    <th style="width: 55px;text-align: center;">操作</th>
    </tr>
    <tbody id="selectUserContent">
    
    <c:choose>
<c:when test="${type eq 0 }">
    <c:forEach var="model" items="${list}" varStatus="var">
    	
    	<tr><td>${model.supervisor.userName }</td><td style='text-align:center'><a><img src='${ctxPath}/images/icon/delete.png' data-id='${model.supervisor.id }' data-name='${model.supervisor.userName }' onClick='remove(this)' class='c_p' title='删除'></a></td></tr> 
    </c:forEach>
</c:when>
<c:when test="${type eq 1}">
    <c:forEach var="model" items="${list}" varStatus="var">
    	
    	<tr><td>${model.subordinates.userName }</td><td style='text-align:center'><a><img src='${ctxPath}/images/icon/delete.png' data-id='${model.subordinates.id }' data-name='${model.subordinates.userName }' onClick='remove(this)' class='c_p' title='删除'></a></td></tr> 
    </c:forEach>
</c:when>
</c:choose>
    

   <%--  --%>
    </tbody>
</table>
</div>
</shield:permssion>